<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="stylesheet" type="text/css" href="__CSS__/main.css" />
    <link rel="stylesheet" type="text/css" href="__CSS__/common.css" />
    <link rel="stylesheet" type="text/css" href="__CSS__/bootstrap.min.css" />
    <script type="text/javascript" src="__EXTEND__/lib/jquery/1.9.1/jquery.min.js"></script>
    <script type="text/javascript" src="__EXTEND__/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="__EXTEND__/lib/layer/2.4/layer.js"></script>
    <![endif]-->
    <title></title>
</head>
<body>
<div class="contant"><div class="row">
      <div class="top">首页>审批申请</div>
        <div class="content addapply">
          <form method='post' action="{:U('edit')}" id='advance'>
          
                <div class="box larg-box">
                    <h1>垫资申请<span>(标*为必填项)</span></h1>
                    <div class="list-block">
                        <div class="row">
                        <label style="width: 13%">收款单位名称: <i class="required">*</i></label>
                            <select name="payee_id" class="payee">
                                    <option value='0'>请选择收款单位</option>
                                    <volist name='payee' id='payee'>
                                        <option value="{$payee.id}" <eq name='payee.id' value='$info.pay_id'>selected</eq> >{$payee.name}</option>
                                    </volist>
                             </select>
                          <div>
                            <label>开户行: <i class="required">*</i></label>
                              <span><input type="text" id="bankName" disabled value="{$info.bank_name}"></span>
                            <!--<span id='bankName'>{$info.bank_name}</span>-->
                            <label>账号: <i class="required">*</i></label>
                              <span><input type="text" style="width:180px;" disabled id="bankCard" value="{$info.bank_card}"></span>
                            <!--<span id="bankCard">{$info.bank_card}</span>-->
                           </div> 
                            
                        </div>
                        <div class="row">
                            <label style="width: 13%">申请垫资时间: <i class="required">*</i></label>
                            <input type="text" id="add_time" name="add_time" value="<empty name='info.add_time'>{:date('Y-m-d')}<else/>{$info.add_time|date='Y-m-d', ###}</empty>" class="datepicker" readonly />
                            <!-- <input type="text" name='add_time' value="{$info.add_time|date='Y-m-d',###}" placeholder="垫资时间" class="datepicker" > -->
                            <!--<label>申请人: <i class="required">*</i></label>-->
                            <!--<input type="text" disabled value="{$info.user_name}">-->
                        </div>
                    </div>
                </div>                  
            <div class="box">
                <h1>操作</h1>
                <div class="list-block">
                    <input type="button" class="button01" id='tijiao' value="提交" >
                    <input type='hidden' name='mat_id' value="{$info.mat_id}" />
                    <input type='hidden' name='user_id' value="{$info.id}" />
                    <!--<input type='hidden' name='userName' value="{$info.user_name}" />-->
                    <input type="reset" name="button" class="button01" id='cancel' value="暂不提交" >
                </div>
            </div>
            
            </form>
        </div>

</div>
</div>
<script type="text/javascript" src='{:COM}js/daterangepicker.min.js'></script>
    <script type="text/javascript" >
    $('input.datepicker').datetimepicker({format : "yyyy-mm-dd", minView : 2, autoclose : true});
        var pay_id={$info.pay_id|default=0};
        $('.payee').change(function(){
            var pay_id=$(this).val();
            $.post('{:U("MatApply/payeeInfo")}',{pay_id:pay_id},function(data){
                 //alert(data.bank_name);
                $('#bankName').val(data.bank_name)  ;
                $('#bankCard').val(data.bank_card)  ;
//                 document.getElementById("bankCard").innerText = data.bank_card;
            });
        });

        $('#tijiao').click(function(){
           var pay_id=$('.payee').val();
           if(pay_id==0){
             alert('请选择收款单位');
             return false;
           }
           $('#advance').submit();
        });
    // function form_validate()
    // {
    //     if (!$("input[name='server_fee']").val()) {
    //         $("input[name='server_fee']").focus().attr('placeholder','不能为空');
    //       } $("input[name='total_fee']").focus();

    //     // 提交状态改:申请待审核
    //     $('#user-status').val(2);
    //     return true;
    // }
 
</script>
</body>
</html>